package common

import (
	"github.com/go-openapi/errors"
	"mlss-cc-a/restapi/operations/alarms"
	"net/http"
)

func CheckForAlarm(param alarms.GetAlarmsParams) error {
	if nil == param.Since {
		println("alarm since can not be empty")
		return errors.New(http.StatusMethodNotAllowed, "alarm since can not be empty")
	}

	if nil == param.Limit {
		println("limit can not be empty")
		return errors.New(http.StatusMethodNotAllowed, "limit can not be empty")
	}

	return nil
}
